﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace SimplePlayer
{
    class Player
    {
        Vector2 position;
        Texture2D shipSprite;
        Vector2 spriteOrigin;
        int windowWidth, windowHeight;

        public Player(GraphicsDevice device, Vector2 position, Texture2D sprite)
        {
            this.position = position; //The position that is passed in is now set to the position above

            shipSprite = sprite; //Set the Texture2D

            /*Setup origin */

            spriteOrigin.X = (float)shipSprite.Width / 2.0f;
            spriteOrigin.Y = (float)shipSprite.Height / 2.0f;

            /* Set window dimensions */
            windowHeight = device.Viewport.Height;
            windowWidth = device.Viewport.Width;
        }
        public void Draw(SpriteBatch batch)
        {
            batch.Draw(shipSprite, position, null, Color.White, 0.0f, spriteOrigin, 1.0f, SpriteEffects.None, 0.0f);
        }
    }
}
